package com.aloda.ojuser.controller.inner;

import com.aloda.ojuser.pojo.entity.User;
import com.aloda.ojuser.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 用户内部调用接口
 *
 * @Author aloda
 * @Date 2025/4/28 14:11
 */
@Slf4j
@RestController
@RequestMapping("/user/inner")
public class UserInnerController {

    @Resource
    private UserService userService;

    /**
     * 通过id获取用户信息
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    public User getById (@PathVariable Long id) {
        return userService.getById(id);
    }
}
